import React from 'react'
import {
  Route,
  IndexRoute
} from 'react-router'

import {
  App,
  Home,
  RoomR,
  Coupon,
  CouponDetail,
  Shop,
  ShopDetail,
  Tour,
  Personal,
  NotFoundPage,
  GameR,
  ExchangeR
} from './containers'

import {
  Recharge,
  Withdraw,
  UserSet,
  Login,
  Registry,
  RedRoom
} from './components'

export default (
  <Route path="/" component={App}>
    <IndexRoute component={Home}/>
    <Route path="coupon">
      <IndexRoute component={Coupon}/>
      <Route path=":id" component={CouponDetail}/>
    </Route>
    <Route path="roomRecord">
      <IndexRoute component={RoomR}/>
    </Route>
    <Route path="shop" component={Shop}/>
    <Route path="user">
      <IndexRoute component={Personal} />
      <Route path="recharge" component={Recharge} />
      <Route path="withdraw" component={Withdraw} />
      <Route path="gamerecord" component={GameR} />
      <Route path="exchangerecord" component={ExchangeR} />
      <Route path="userset" component={UserSet} />
    </Route>
    <Route path="login" component={Login} />
    <Route path="registry" component={Registry} />
    <Route path="redroom" component={RedRoom} />
    <Route path="*" component={NotFoundPage}/>
  </Route>
);